<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/templates/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.MyAccount}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditUserLabel_password}" for="password" />
                    <h:inputText id="password" value="#{userController.selected.password}" title="#{bundle.EditUserTitle_password}" required="true" requiredMessage="#{bundle.EditUserRequiredMessage_password}"/>
                    <h:outputLabel value="#{bundle.EditUserLabel_name}" for="name" />
                    <h:inputText id="name" value="#{userController.selected.name}" title="#{bundle.EditUserTitle_name}" required="true" requiredMessage="#{bundle.EditUserRequiredMessage_name}"/>
                    <h:outputLabel value="#{bundle.EditUserLabel_email}" for="email" />
                    <h:inputText id="email" value="#{userController.selected.email}" title="#{bundle.EditUserTitle_email}" required="true" requiredMessage="#{bundle.EditUserRequiredMessage_email}"/>
                    <h:outputLabel value="#{bundle.EditUserLabel_bank}" for="bank" />
                    <h:inputText id="bank" value="#{userController.selected.bank}" title="#{bundle.EditUserTitle_bank}" />
                    <h:outputLabel value="#{bundle.EditUserLabel_bankNo}" for="bankNo" />
                    <h:inputText id="bankNo" value="#{userController.selected.bankNo}" title="#{bundle.EditUserTitle_bankNo}" />
                    <h:outputLabel value="#{bundle.EditUserLabel_vatCode}" for="vatCode" />
                    <h:inputText id="vatCode" value="#{userController.selected.vatCode}" title="#{bundle.EditUserTitle_vatCode}" required="true" requiredMessage="#{bundle.EditUserRequiredMessage_vatCode}"/>
                    <h:outputLabel value="#{bundle.EditUserLabel_street}" for="street" />
                    <h:inputText id="street" value="#{userController.selected.street}" title="#{bundle.EditUserTitle_street}" required="true" requiredMessage="#{bundle.EditUserRequiredMessage_street}"/>
                    <h:outputLabel value="#{bundle.EditUserLabel_city}" for="city" />
                    <h:inputText id="city" value="#{userController.selected.city}" title="#{bundle.EditUserTitle_city}" required="true" requiredMessage="#{bundle.EditUserRequiredMessage_city}"/>
                    <h:outputLabel value="#{bundle.EditUserLabel_postCode}" for="postCode" />
                    <h:inputText id="postCode" value="#{userController.selected.postCode}" title="#{bundle.EditUserTitle_postCode}" required="true" requiredMessage="#{bundle.EditUserRequiredMessage_postCode}"/>
                </h:panelGrid>
                <h:commandLink action="#{userController.update}" value="#{bundle.EditUserSaveLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
